package com.xiegang.apipassenger.controller;

import com.xiegang.apipassenger.remote.ServiceOrderClient;
import com.xiegang.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xieGang
 * @description
 * @date 2023/2/28 19:34
 **/
@RestController
public class TestController {

    @GetMapping("/test")
    public String test() {
        return "test api-passenger";
    }


    @GetMapping("/authTest")
    public ResponseResult authTest() {
        return ResponseResult.success("auth test");
    }

    @GetMapping("/noAuthTest")
    public ResponseResult noAuthTest() {
        return ResponseResult.success("no auth test");
    }

    @Autowired
    private ServiceOrderClient serviceOrderClient;
    @GetMapping("/test111/{orderId}")
    public String testdis(@PathVariable("orderId") long orderId){
        serviceOrderClient.testDIs(orderId);
        return "test";
    }

}
